package mcma;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.*;
import com.borland.dx.sql.dataset.Database;
import com.borland.dx.sql.dataset.*;
import com.borland.dx.dataset.TableDataSet;
import com.borland.dx.dataset.DataSetView;
import javax.swing.JTable;
import com.borland.dbswing.TableScrollPane;
import com.borland.dbswing.JdbTable;
import com.borland.dbswing.JdbToggleButton;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Frame1 extends JFrame {
    JPanel contentPane;
    BorderLayout borderLayout1 = new BorderLayout();
    Database database1 = new Database();
    QueryDataSet queryDataSet1 = new QueryDataSet();
    JdbTable jdbTable1 = new JdbTable();
    JPanel jPanel1 = new JPanel();
    public Frame1() {
        try {
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    /**
     * Component initialization.
     *
     * @throws java.lang.Exception
     */
    private void jbInit() throws Exception {
        contentPane = (JPanel) getContentPane();
        contentPane.setLayout(borderLayout1);
        setSize(new Dimension(762, 717));
        setTitle("Frame Title");
        database1.setConnection(new ConnectionDescriptor(
                "jdbc:mysql://localhost/test?", "root", "vertrigo", false,
                "com.mysql.jdbc.Driver",
                ConnectionDescriptor.arrayToProperties(new String[][] { {
                "rollbackOnPooledClose", "true"}, {"reconnectAtTxEnd", "false"},
                {"failOverReadOnly", "true"}, {"dontTrackOpenResources",
                "false"}, {"secondsBeforeRetryMaster", "30"},
                {"nullCatalogMeansCurrent", "true"},
                {"rewriteBatchedStatements", "false"}, {"useSqlStateCodes",
                "true"}, {"logXaCommands", "false"}, {"roundRobinLoadBalance",
                "false"}, {"nullNamePatternMatchesAll", "true"},
                  {"continueBatchOnError", "true"}, {"ignoreNonTxTables",
                "false"}, {"emptyStringsConvertToZero", "true"},
                  {"enableQueryTimeouts", "true"}, {"useTimezone", "false"},
                  {"dumpQueriesOnException", "false"}, {"allowMultiQueries",
                "false"}, {"noDatetimeStringSync", "false"},
                  {"useLocalSessionState", "false"},
                  {"includeInnodbStatusInDeadlockExceptions", "false"},
                  {"autoReconnect", "false"}, {"tcpRcvBuf", "0"}, {"pedantic",
                "false"}, {"useFastIntParsing", "true"}, {"yearIsDateType",
                "true"}, {"ultraDevHack", "false"}, {"useInformationSchema",
                "false"}, {"slowQueryThresholdMillis", "2000"},
                  {"resultSetSizeThreshold", "100"}, {"useJvmCharsetConverters",
                "false"}, {"useLegacyDatetimeCode", "true"},
                  {"useStreamLengthsInPrepStmts", "true"}, {"paranoid", "false"},
                  {"populateInsertRowWithDefaultValues", "false"},
                  {"logSlowQueries", "false"}, {"maxReconnects", "3"},
                  {"useCompression", "false"}, {"maxQuerySizeToLog", "2048"},
                  {"runningCTS13", "false"}, {"useOldUTF8Behavior", "false"},
                  {"useFastDateParsing", "true"},
                  {"holdResultsOpenOverStatementClose", "false"},
                  {"maintainTimeStats", "true"}, {"DBNAME", "test"}, {"logger",
                "com.mysql.jdbc.log.StandardLogger"}, {"useNanosForElapsedTime",
                "false"}, {"useUnicode", "true"}, {"clientInfoProvider",
                "com.mysql.jdbc.JDBC4CommentClientInfoProvider"},
                  {"tcpTrafficClass", "0"}, {"reportMetricsIntervalMillis",
                "30000"}, {"blobsAreStrings", "false"}, {"blobSendChunkSize",
                "1048576"}, {"functionsNeverReturnBlobs", "false"},
                  {"cachePrepStmts", "false"}, {"tcpKeepAlive", "true"},
                  {"elideSetAutoCommits", "false"},
                  {"generateSimpleParameterMetadata", "false"},
                  {"relaxAutoCommit", "false"}, {"allowUrlInLocalInfile",
                "false"}, {"prepStmtCacheSize", "25"},
                  {"useSSPSCompatibleTimezoneShift", "false"},
                  {"enablePacketDebug", "false"}, {"useGmtMillisForDatetimes",
                "false"}, {"HOST", "localhost"}, {"tcpNoDelay", "true"},
                  {"requireSSL", "false"}, {"padCharsWithSpace", "false"},
                  {"dumpMetadataOnColumnNotFound", "false"},
                  {"retainStatementAfterResultSetClose", "false"},
                  {"profilerEventHandler",
                  "com.mysql.jdbc.profiler.LoggingProfilerEventHandler"},
                  {"processEscapeCodesForPrepStmts", "true"}, {"connectTimeout",
                "0"}, {"dynamicCalendars", "false"}, {"callableStmtCacheSize",
                "100"}, {"slowQueryThresholdNanos", "0"},
                  {"strictFloatingPoint", "false"}, {"tinyInt1isBit", "true"},
                  {"initialTimeout", "2"}, {"useBlobToStoreUTF8OutsideBMP",
                "false"}, {"noAccessToProcedureBodies", "false"},
                  {"metadataCacheSize", "50"}, {"defaultFetchSize", "0"},
                  {"cacheCallableStmts", "false"},
                  {"overrideSupportsIntegrityEnhancementFacility", "false"},
                  {"noTimezoneConversionForTimeType", "false"}, {"autoSlowLog",
                "true"}, {"pinGlobalTxToPhysicalConnection", "false"},
                  {"useReadAheadInput", "true"}, {"useCursorFetch", "false"},
                  {"autoClosePStmtStreams", "false"}, {"explainSlowQueries",
                "false"}, {"allowNanAndInf", "false"}, {"autoDeserialize",
                "false"}, {"largeRowSizeThreshold", "2048"},
                  {"netTimeoutForStreamingResults", "600"}, {"socketTimeout",
                "0"}, {"socketFactory", "com.mysql.jdbc.StandardSocketFactory"},
                  {"cacheServerConfiguration", "false"},
                  {"useOldAliasMetadataBehavior", "false"},
                  {"useHostsInPrivileges", "true"}, {"useSSL", "false"},
                  {"zeroDateTimeBehavior", "exception"}, {"strictUpdates",
                "true"}, {"capitalizeTypeNames", "true"},
                  {"useDynamicCharsetInfo", "true"}, {"profileSQL", "false"},
                  {"tcpSndBuf", "0"}, {"queriesBeforeRetryMaster", "50"},
                  {"maxRows", "-1"}, {"useDirectRowUnpack", "true"},
                  {"packetDebugBufferSize", "20"}, {"emulateLocators", "false"},
                  {"locatorFetchBufferSize", "1048576"},
                  {"createDatabaseIfNotExist", "false"},
                  {"useJDBCCompliantTimezoneShift", "false"},
                  {"treatUtilDateAsTimestamp", "true"},
                  {"transformedBitIsBoolean", "false"}, {"gatherPerfMetrics",
                "false"}, {"PORT", "3306"}, {"useServerPrepStmts", "false"},
                  {"loadBalanceStrategy", "random"}, {"traceProtocol", "false"},
                  {"emulateUnsupportedPstmts", "true"}, {"allowLoadLocalInfile",
                "true"}, {"alwaysSendSetIsolation", "true"},
                  {"useUnbufferedInput", "true"}, {"verifyServerCertificate",
                "true"}, {"selfDestructOnPingSecondsLifetime", "0"},
                  {"autoGenerateTestcaseScript", "false"}, {"interactiveClient",
                "false"}, {"useUsageAdvisor", "false"},
                  {"useOnlyServerErrorMessages", "true"},
                  {"clobberStreamingResults", "false"},
                  {"autoReconnectForPools", "false"},
                  {"jdbcCompliantTruncation", "true"}, {"prepStmtCacheSqlLimit",
                "256"}, {"cacheResultSetMetadata", "false"},
                  {"selfDestructOnPingMaxOperations", "0"},
        })));
        queryDataSet1.setLocale(new java.util.Locale("sr", "", ""));
        queryDataSet1.setSchemaName("");
        queryDataSet1.setTableName("");
        queryDataSet1.setStoreName("");
        queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(
                database1, "SELECT * FROM korisnici", null, true, Load.ALL));
        jdbTable1.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
        jdbTable1.setDataSet(queryDataSet1);
        contentPane.add(jPanel1, java.awt.BorderLayout.CENTER);
        jPanel1.add(jdbTable1);
    }
}
